package com.eat.fish_service.service;

import com.eat.common_utils.R;
import com.eat.fish_service.entity.Dao.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.eat.fish_service.entity.ExpertQuery;
import com.eat.fish_service.entity.UserQuery;
import com.eat.fish_service.entity.VO.EditChargeVo;
import com.eat.fish_service.entity.VO.UserVo;
import com.eat.fish_service.entity.newManager;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author LWB
 * @since 2022-03-21
 */
public interface UserService extends IService<User> {

    //小程序登录方法
    R login(User user);

    R register(User user);

    R getStatus(String username);

    //web页面登录方法
    R webLogin(UserVo userVo);

    R editCharge(EditChargeVo editCharge);

    R uploadAvater(MultipartFile pic, String id);

    R updateUserMes(User user);

    //发送邮箱验证码
    R sendCode(String to, String id, HttpSession session);

    R findSendCode(String to, String id, HttpSession session);

    //条件查询+分页展现普通用户信息
    R findUserCondition(Long current, Long size, UserQuery UserQuery);

    R findExpertCondition(Long current, Long size, UserQuery UserQuery);

    R findManagerCondition(Long current, Long size, UserQuery UserQuery);

    //添加管理员或超级管理员
    R addManager(newManager newManager, int status);

    //删除管理员
    R deleteManager(String UserId);

    R getUserMess(String username,HttpServletRequest req,HttpServletResponse res);

    R webLogin(UserVo userVo, HttpServletRequest request, HttpServletResponse response);
}
